<?php

class Application_Form_Visiteur extends Zend_Form {

    public function init() {
        $this->setName('visiteur');

        $id = new Zend_Form_Element_Text('id');
        $id->setLabel('Identifiant')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEMpty');
        $nom = new Zend_Form_Element_Text('nom');
        $nom->setLabel('Nom')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEMpty');
        $prenom = new Zend_Form_Element_Text('prenom');
        $prenom->setLabel('Prenom')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEMpty');
        $login = new Zend_Form_Element_Text('login');
        $login->setLabel('Login')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEMpty');
        $mdp = new Zend_Form_Element_Text('mdp');
        $mdp->setLabel('Mot de Passe')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEMpty');
        $adresse = new Zend_Form_Element_Text('adresse');
        $adresse->setLabel('Adresse')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEMpty');
        $cp = new Zend_Form_Element_Text('cp');
        $cp->setLabel('Code Postale')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEMpty');
        $ville = new Zend_Form_Element_Text('ville');
        $ville->setLabel('Ville')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEMpty');
        $embauche = new Zend_Form_Element_Text('dateEmbauche');
        $embauche->setLabel('Embauche')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEMpty');
        $envoyer = new Zend_Form_Element_Submit('envoyer');
        $envoyer->setattrib('id', 'boutonenvoyer');

        $this->addElements(array($id, $nom, $prenom, $login, $mdp, $adresse, $cp, $ville, $embauche, $envoyer));
    }

}

